
package com.hitrust.gs.vo;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.hitrust.gs.service.GSBaseBean;

/*
	Author    :wuyang
	CreateTime:2013-12-25 18:50
*/
public class ProductUpdatePicVO implements GSBaseBean
{

	public String id ;
	public String product_id; // 产品ID
	public String concentricity_code; // 产品编码
	public String pic; // 是否可出库（1，是可以，0是不可以）
	public String create_user_id; // 创建人ID
	public String create_user; // 创建人
	public String create_time; // 创建时间
	public String auditing_user_id; // 审批人ID
	private String auditing_user; //审批人
	private String auditing_time; //审批时间
	private String auditing_status; //审批状态（0，待审批，1，已审批，2，审批不通过）
	private String enabled_time; //启用日期
	private String status; //是否已经执行（0，未执行，1已经执行）
	
	private String name;//产品名称;
	private String spec;//规格
	private String model; //型号
	private String m_drawing_piece_code;// 图件号
	private String providername; //供应商
	private String areatype; //区域分类
	private String type_name; //招标分类
	
	
	
	public Object process(ResultSet aResultSet) throws SQLException {
		ProductUpdatePicVO vo = new ProductUpdatePicVO();
		vo.id = isNull(aResultSet.getString("id"));
		 vo.concentricity_code = isNull(aResultSet.getString("concentricity_code"));
		 vo.name = isNull(aResultSet.getString("name")); 
		 vo.spec = isNull(aResultSet.getString("spec"));
		 vo.model = isNull(aResultSet.getString("model"));
		 vo.m_drawing_piece_code = isNull(aResultSet.getString("drawing_piece_code"));
		 vo.providername = isNull(aResultSet.getString("providername"));
		 vo.areatype = isNull(aResultSet.getString("areatype"));
		 vo.type_name = isNull(aResultSet.getString("type_name"));
		 vo.enabled_time = isNull(aResultSet.getString("enabled_time"));
		 vo.type_name = isNull(aResultSet.getString("type_name"));
		 String strStatus = isNull(aResultSet.getString("status"));
		 if (!"".equals(strStatus)) {
			if (strStatus.equals("1")) {
				 vo.status = "已执行";
			}else{
				vo.status = "未执行";
			}
		}
		 
		 String auditStatus = isNull(aResultSet.getString("auditing_status"));
		 if (!"".equals(auditStatus)) {
			if (auditStatus.equals("0")) {
				 vo.auditing_status = "待审批";
			}else if(auditStatus.equals("1")){
				vo.auditing_status = "已审批";
			}else if(auditStatus.equals("2")){
				vo.auditing_status = "审批不通过";
			}
		}
		 vo.create_user = isNull(aResultSet.getString("create_user"));
		 vo.create_time = isNull(aResultSet.getString("create_time"));
		 vo.auditing_user = isNull(aResultSet.getString("auditing_user"));
		 vo.auditing_time = isNull(aResultSet.getString("auditing_time"));
		return vo;
	}
	
	
	private String isNull(String value){
		if (value == null) {
			return "";
		}else{
			return value;
		}
	}
	
	
	
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSpec() {
		return spec;
	}
	public void setSpec(String spec) {
		this.spec = spec;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public String getM_drawing_piece_code() {
		return m_drawing_piece_code;
	}
	public void setM_drawing_piece_code(String m_drawing_piece_code) {
		this.m_drawing_piece_code = m_drawing_piece_code;
	}
	public String getProvidername() {
		return providername;
	}
	public void setProvidername(String providername) {
		this.providername = providername;
	}
	public String getAreatype() {
		return areatype;
	}
	public void setAreatype(String areatype) {
		this.areatype = areatype;
	}
	public String getType_name() {
		return type_name;
	}
	public void setType_name(String type_name) {
		this.type_name = type_name;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getProduct_id() {
		return product_id;
	}
	public void setProduct_id(String product_id) {
		this.product_id = product_id;
	}
	public String getConcentricity_code() {
		return concentricity_code;
	}
	public void setConcentricity_code(String concentricity_code) {
		this.concentricity_code = concentricity_code;
	}
	public String getPic() {
		return pic;
	}
	public void setPic(String pic) {
		this.pic = pic;
	}
	public String getCreate_user_id() {
		return create_user_id;
	}
	public void setCreate_user_id(String create_user_id) {
		this.create_user_id = create_user_id;
	}
	public String getCreate_user() {
		return create_user;
	}
	public void setCreate_user(String create_user) {
		this.create_user = create_user;
	}
	public String getCreate_time() {
		return create_time;
	}
	public void setCreate_time(String create_time) {
		this.create_time = create_time;
	}
	public String getAuditing_user_id() {
		return auditing_user_id;
	}
	public void setAuditing_user_id(String auditing_user_id) {
		this.auditing_user_id = auditing_user_id;
	}
	public String getAuditing_user() {
		return auditing_user;
	}
	public void setAuditing_user(String auditing_user) {
		this.auditing_user = auditing_user;
	}
	public String getAuditing_time() {
		return auditing_time;
	}
	public void setAuditing_time(String auditing_time) {
		this.auditing_time = auditing_time;
	}
	public String getAuditing_status() {
		return auditing_status;
	}
	public void setAuditing_status(String auditing_status) {
		this.auditing_status = auditing_status;
	}
	public String getEnabled_time() {
		return enabled_time;
	}
	public void setEnabled_time(String enabled_time) {
		this.enabled_time = enabled_time;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
}
